package com.easy.base.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.easy.core.dbHandle.entity.BaseEntity;

/**
 * 描述：职位
 * @package com.easy.base.model
 * @class Position
 */
@Entity
@Table(name = "BASE_POSITION")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Position extends BaseEntity {
	
	private static final long serialVersionUID = 1L;
	
	@Id
	@GeneratedValue
	private @Column(name="ID")  			Long		id;
	private @Column(name="POSITION_NAME") 	String 		name;			//名称
	private @Column(name="POSITION_PARENT") String 		parentCode;		//父编号
//	private Position 	parent;			//父，根为ROOT
	private @Column(name="POSITION_DESC")	String 		desc;			//描述
	private @Column(name="POSITION_LEVEL") 	Integer 	level;			//等级
	private @Column(name="PERMIT_CODES") 	String 		permitCodes;	//权限串，如：000101;000102
	
//	private List<Operator> operators = new ArrayList<Operator>();
//	private List<Position> children = new ArrayList<Position>();
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getParentCode() {
		return parentCode;
	}
	public void setParentCode(String parentCode) {
		this.parentCode = parentCode;
	}
	public String getDesc() {
		return desc;
	}
	public void setDesc(String desc) {
		this.desc = desc;
	}
	public Integer getLevel() {
		return level;
	}
	public void setLevel(Integer level) {
		this.level = level;
	}
	public String getPermitCodes() {
		return permitCodes;
	}
	public void setPermitCodes(String permitCodes) {
		this.permitCodes = permitCodes;
	}
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	
}
